package com.yc.designMode.cor;

public class FilterCor {
	
	public static void main(String[] args) {
		FilterChainImpl fc = new FilterChainImpl();
		
		//模拟web服务器接收到外部请求
		Request req = new Request();
		req.setReq("服务器接收到请求");
		Response res = new Response();
		res.setRes("");//响应的消息
		
		//添加过滤器
		fc.addFilter(new MyFilterImpl());
		
		//开始处理request（respone是通过filter中的写法，自然形成倒序排列的）
		fc.doFilter(req, res);
	}

}
